﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Quality.BasicData
{
    public partial class selectorg : Form
    {
        public selectorg()
        {
            InitializeComponent();
        }

        private void selectorg_Load(object sender, EventArgs e)
        {
            sqlHelper.setTreeView(treeView1, 0);
        }
        
       
          public event TransfDelegate TransfEvent;
        private void toolStripButton1_Click(object sender, EventArgs e)
        { 
            
            string[] d = new string[2];
            //当点击表头部的列时，e.RowIndex==-1
            if (treeView1.SelectedNode != null)
            {
                d[0] = treeView1.SelectedNode.Tag.ToString();
                d[1] =treeView1.SelectedNode.Text.ToString();



                TransfEvent(d);
                this.Close();

            }

        }

        private void selectorg_Shown(object sender, EventArgs e)
        {
            treeView1.SelectedNode = null;
            
        }
    }
}
